<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <title>Schedule Western</title>

    <!-- Bootstrap core CSS -->
    <link href="<?php echo $this->baseUrl()?>/css/bootstrap.css" rel="stylesheet">
	<link href="<?php echo $this->baseUrl(); ?>/css/font-awesome.min.css" rel="stylesheet">
	<link href="<?php echo $this->baseUrl(); ?>/css/font-awesome.css" rel="stylesheet">
    <!-- Add custom CSS here -->
    <link href="<?php echo $this->baseUrl(); ?>/css/sb-admin.css" rel="stylesheet">
    <link rel="stylesheet" href="<?php echo $this->baseUrl(); ?>/font-awesome/css/font-awesome.min.css">
    <!-- Page Specific CSS -->
  </head>

  <body>
<?php 
	$tr = Application_Form_FrmLanguages::getCurrentlanguage(); 
	$session_user=new Zend_Session_Namespace('auth');
	$request=Zend_Controller_Front::getInstance()->getRequest();
	$user_info = new Application_Model_DbTable_DbGetUserInfo();
	$result = $user_info->getUserInfo();
	//module user
	$url_user_list = array($this->url(array('module'=>'foundation','controller'=>'user','action'=>'index')), "MENU_RSVACL_USER_INDEX");
	$url_user_add = array($this->url(array('module'=>'foundation','controller'=>'user','action'=>'add-user')), "MENU_RSVACL_USER_ADD_USER");
	$url_add_user_access = array($this->url(array('module'=>'foundation','controller'=>'user-access','action'=>'index')), "MENU_RSVACL_USER_ACCESS_ADD");
	$url_user_acl_list = array($this->url(array('module'=>'foundation','controller'=>'acl','action'=>'index')), "MENU_RSVACL_USER_ACL_LIST");
	$url_user_type = array($this->url(array('module'=>'foundation','controller'=>'user-type','action'=>'index')), "MENU_RSVACL_USER_TYPE_LIST");
	//module Subject
	$url_subject = $this->url(array('module'=>'foundation','controller'=>'index','action'=>''));
	$url_subject_list = $this->url(array('module'=>'foundation','controller'=>'subject','action'=>'list'));
	$url_subject_add = $this->url(array('module'=>'foundation','controller'=>'subject','action'=>'add'));
	$url_subject_edit = $this->url(array('module'=>'foundation','controller'=>'subject','action'=>'edit'));
?>
<?php if (empty($session_user->user_name)){?>
<?php $db=Application_Model_DbTable_DbUsers::redirectUrl("/index/");
?>
<?php }else{?>

<!DOCTYPE html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <title>Schedule Western</title>

    <!-- Bootstrap core CSS -->
    <link href="<?php echo $this->baseUrl()?>/css/bootstrap.css" rel="stylesheet">
	<link href="<?php echo $this->baseUrl(); ?>/css/font-awesome.min.css" rel="stylesheet">
	<link href="<?php echo $this->baseUrl(); ?>/css/font-awesome.css" rel="stylesheet">
    <!-- Add custom CSS here -->
    <link href="<?php echo $this->baseUrl(); ?>/css/sb-admin.css" rel="stylesheet">
    <link rel="stylesheet" href="<?php echo $this->baseUrl(); ?>/font-awesome/css/font-awesome.min.css">
    <!-- Page Specific CSS -->
  </head>
<body>
    <div id="wrapper">
       <!-- Sidebar -->
      <!-- Sidebar -->
      <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
          <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a  style="border: 0; " class="navbar-brand" href="<?php echo $this->baseUrl(); ?>/foundation"><img src="<?php echo $this->baseUrl(); ?>/images/logo_download.gif" width="30"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
        </div>
    

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse navbar-ex1-collapse">  
          <ul class="nav navbar-nav navbar-left navbar-user" id="side-menu">
            <?php if($result["level"]== 1|| 2){ ?>
            <li class="dropdown user-dropdown">
              <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-group"></i>&nbsp;&nbsp;<?php echo "Manage User"?> <b class="caret"></b></a>
              <ul class="dropdown-menu">
                <li><a href="<?php echo $url_user_add[0]; ?>"><i class="icon-user"></i>&nbsp;&nbsp;&nbsp;<?php echo $tr->translate($url_add_user_access[1])?></a></li>
                <li><a href="<?php echo $url_user_list[0]; ?>"><i class="icon-circle-arrow-right"></i>&nbsp;&nbsp;&nbsp;<?php echo $tr->translate($url_user_list[1])?></a></li>
             </ul>
            </li>
            <?php }?>
            <?php if($result["level"]==1 || 2){?>
             <li class="dropdown user-dropdown">
              <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-book"></i><?php echo " Subject" ?> <b class="caret"></b></a>
              <ul class="dropdown-menu">
                <li><a href="<?php echo $url_subject_add; ?>"><i class="icon-book"></i> <?php echo " Add New Subject " ?></a></li>
                <li><a href="<?php echo $url_subject_list; ?>"><i class="icon-book"></i><?php echo " List All Subject " ?></a></li>
              </ul>
            </li>
            <?php }?>
            <li class="dropdown user-dropdown">
              <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-user-md"></i> Lecture Personal Schedule<b class="caret"></b></a>
              <ul class="dropdown-menu">
              	<li><a href="<?php echo $this->baseUrl(); ?>/foundation/index/listprofileteacher"><i class="icon-circle-arrow-right"></i>&nbsp;&nbsp;&nbsp; List All Profile Teacher</a></li>
                <li><a href="<?php echo $this->baseUrl(); ?>/foundation/index/listpersonalschedule"><i class="icon-circle-arrow-right"></i>&nbsp;&nbsp;&nbsp; List All Personal Schedule</a></li>
              </ul>
            </li>
            <li class="dropdown user-dropdown">
              <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-calendar"></i> Perpare Schedule <b class="caret"></b></a>
              <ul class="dropdown-menu">
                <li><a href="<?php echo $this->baseUrl(); ?>/foundation/index/schedule"><i class="icon-calendar"></i> &nbsp;&nbsp;Add New Schedule</a></li>
                <li><a href="#"><i class="icon-calendar"></i> &nbsp;&nbsp;View All Schedule Student</a></li>
                <li><a href="#"><i class="icon-calendar"></i> &nbsp;&nbsp;View All Schedule Teacher</a></li>
              </ul>
            </li>
          </ul>
          <ul class="nav navbar-nav navbar-right navbar-user">          	
            <li class="dropdown user-dropdown" >
				<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-user"></i> <?php echo ucwords(strtolower($session_user->fullname));?> <b class="caret"></b></a>
              <ul class="dropdown-menu">
                <li><a href="#"><i class="icon-user"></i> Profile</a></li>
                <li><a href="<?php echo $this->url(array('module'=>'foundation','controller'=>'user','action'=>'view-user', 'id'=>$session_user->user_id));?>"><i class="icon-gear"></i> Settings</a></li>
                <li class="divider"></li>
                <li><a href="<?php echo $this->url(array('module'=>'','controller'=>'index','action'=>'logout', 'value'=>1));?>"><i class="icon-power-off"></i> Log Out</a></li>
              </ul>
            </li>
            
          </ul>
        </div><!-- /.navbar-collapse -->
      </nav>
<form action="<?php echo $url_subject_add;?>" method="post" id="frm">
    <div id="wrapper">
      <div id="page-wrapper">

        <div class="row"  style=" width:100%; margin:0 auto" >
          <div class="col-lg-12">
            <h2 style="color:#00F">Create Subject</h2>
          </div>
        </div><!-- /.row -->

        <div class="row">
        <div class="panel-heading">    	  
        
          <button name="save_new" value="save_new" class="btn btn-small btn-primary">
			<b><i class="fa fa-plus"></i></b> &nbsp;Save New 
		  </button>
		  <button name="save_colse" value="save_colse" class="btn btn-small btn-primary">
		  <b><i class="icon-check"></i></b> &nbsp;Save Colse	
		  </button>
		  <a href="<?php echo $url_subject;?>">
		  <button type="button" name="cancel" value="cancel" class="btn btn-small btn-warning">
			  <b><i class="fa fa-times"></i></b> &nbsp;Cancel					 
		  </button>
		  </a>
        </div>
        <table border="0" cellpadding="5" width="50%" style="margin:0 auto;">
        	<tr>
            	<td>Name Faculty:</td>
                <td> <?php echo $this->fromsubject->getElement("fac_id");?></td>
            </tr>
            <tr>
            	<td width="150px">Name Department:</td>
                <td> <?php echo $this->fromsubject->getElement("dpt_id");?></td>
            </tr>
            <tr>
            	<td width="150px">Name Year:</td>
                <td> <?php echo $this->fromsubject->getElement("year_id");?></td>
            </tr>
            <tr>
            	<td width="150px">Name Semester:</td>
                <td> <?php echo $this->fromsubject->getElement("semester_id");?></td>
            </tr>
            <tr>
            	<td>Subject Name:</td>
                <td> <?php echo $this->fromsubject->getElement("subject_name");?></td>
            </tr>
            <tr>
            	<td>Ordering:</td>
                <td> <?php echo $this->fromsubject->getElement("ordering");?></td>
            </tr>
            <tr>
            	<td>Description :</td>
                <td> <?php echo $this->fromsubject->getElement("description");?></td>
            </tr>
        </table>
        
        </div><!-- /#page-row -->
      </div><!-- /#page-wrapper -->

    </div><!-- /#wrapper -->   
</form>
<!-- Modal -->
 </div><!-- /#wrapper -->
        <!-- Bootstrap core JavaScript -->
    <script src="<?php echo $this->baseUrl(); ?>/js/jquery.min.js"></script>
    <script src="<?php echo $this->baseUrl(); ?>/js/bootstrap.js"></script>
    <!-- Page Specific Plugins -->
    <script src="<?php echo $this->baseUrl(); ?>/js/raphael-min.js"></script>
    <script src="<?php echo $this->baseUrl(); ?>/js/morris-0.4.3.min.js"></script>
    <script src="<?php echo $this->baseUrl(); ?>/js/morris/chart-data-morris.js"></script>
    <script src="<?php echo $this->baseUrl(); ?>/js/tablesorter/jquery.tablesorter.js"></script>
    <script src="<?php echo $this->baseUrl(); ?>/js/tablesorter/tables.js"></script>
<script type="text/javascript" src="<?php echo $this->baseUrl()?>/js/jquery-1.7.2.min.js"></script>
<script src="<?php echo $this->baseUrl()?>/js/validation/languages/jquery.validationEngine-en.js" type="text/javascript" charset="utf-8"></script>
<link type="text/css" rel="stylesheet" media="screen" href="<?php echo $this->baseUrl()?>/js/validation/validationEngine.jquery.css">
<script src="<?php echo $this->baseUrl()?>/js/validation/jquery.validationEngine.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" src="<?php echo $this->baseUrl()?>/js/jquery-ui-1.8.20.custom.min.js"></script>
<link type="text/css" href="<?php echo $this->baseUrl()?>/css/custom-theme/jquery-ui-1.8.20.custom.css" rel="stylesheet" />	
<script type="text/javascript">
$(function(){				
	$("#frm").validationEngine();
});
</script>
  </body>
</html>
<?php }?>